﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Medianamik.Core
{
    public class Culture
    {
        public Culture(CultureInfo pCulture)
        {
            if (pCulture == null) { throw new ArgumentNullException("pCulture"); }
            CultureInfo = pCulture;
        }

        public Culture(CultureInfo pCulture, bool pMedianamikActive, bool pContentManagementActive, short pPosition)
            :this(pCulture)
        {
            MedianamikActive = pMedianamikActive;
            ContentManagementActive = pContentManagementActive ;
            Position = pPosition;
        }

        public Culture(string pCultureName)
        {
            if (pCultureName == null) { throw new ArgumentNullException("pCulture"); }
            CultureInfo = CultureInfo.GetCultureInfo(pCultureName);
        }

        public Culture(string pCultureName, bool pMedianamikActive, bool pContentManagementActive, short pPosition)
            :this(pCultureName )
        {
            MedianamikActive = pMedianamikActive;
            ContentManagementActive = pContentManagementActive;
            Position = pPosition;
        }

        public CultureInfo CultureInfo
        {
            get;
            private set;
        }
        public string CultureName { get { return CultureInfo.Name; } }
        public bool MedianamikActive { get; set; }
        public bool ContentManagementActive { get; set; }
        public short Position { get; set; }
    }
}
